home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
YERK
/
SUPPLEME
/
UNSUPPOR
/
UTILITIE
/
BLACKOUT
next >
Wrap
Text File
|
1986-02-08
|
1KB
|
49 lines
( Blackout - Paints the entire Macintosh screen black and waits for <cr> )
:CLASS ViewPort <Super GrafPort
( -- ) ( Initialize the grafport structure )
:M NEW: (abs) call OpenPort ;M
( -- ) ( Paint the whole grafport rectangle )
:M Paint: paint: PortRect ;M
;CLASS
ViewPort Port
: ScreenBits
$ 904 -base @ ( currentA5 -- )
-base @ ( <address of quickdraw globals> -- )
$ FFFFFF86 + ( <address of screenbits> -- )
$ 6 + ( <address of bounds rect> -- )
dup ( adr adr -- )
-base @ ( adr <first point> -- )
unpack ( adr l t -- )
rot ( l t adr -- )
$ 4 + ( l t <adr of second point> -- )
-base @ ( l t point -- )
unpack ( l t r b )
;
( WaitCR - waits for a <cr> )
: WaitCR BEGIN $ 0D key = UNTIL ;
( hidemouse - hides the cursor )
: HideMouse call HideCursor ;
( showmouse - shows the cursor )
: ShowMouse call ShowCursor ;
( BlackOut - the word that starts it all )
: BlackOut
HideMouse
SavePort
New: Port
ScreenBits PutRect: Port
Paint: Port
WaitCR
ShowMouse
RestPort
;